package queue;

public class Receiver extends Thread {

	private final Channel channel;

	public Receiver(String name, Channel channel) {
		super(name);
		this.channel = channel;
	}

	public void run(){
		while(true){
			Request request = channel.takeRequest();
			try {
				request.execute();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
	
}
